package model;

import java.sql.*;
import java.util.*;

public class ConnectionManager {

	static Connection con;
	static String url;

	public static Connection getConnection()
	{
		try
		{
			String url = "jdbc:postgresql://" + "localhost:5432/PIP"; 
			Class.forName("org.postgresql.Driver");
			try
			{            	
				con = DriverManager.getConnection(url,"pip","jiutuebe"); 
			}
			catch (SQLException ex)
			{
				ex.printStackTrace();
			}
		}
		catch(ClassNotFoundException e)
		{
			System.out.println(e);
		}
		return con;
	}
}